package cn.com.dhcc.aml.redisssl;

import jakarta.annotation.Resource;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author songyinyin
 * @since 2024/6/26 下午1:11
 */
@RestController
public class TestController {

    @Resource
    private RedisTemplate<String, String> redisTemplate;


    @GetMapping("/test/redis")
    public Object test() {
        redisTemplate.opsForValue().set("test", "test: " + System.currentTimeMillis());
        return redisTemplate.opsForValue().get("test");
    }
}
